% ------------------------------------------------------------------- 
% Set the TeXShop search preferences to 
%   TeXShop->Preferences->Typesetting->SyncMethod->Search
% This will search the nuweb code rather than the LaTeX code.
%!TEX TS-program = pdflatex
%!TEX root       = ./QSEPack.tex
% ------------------------------------------------------------------- 

\documentclass[oneside,notitlepage,11pt]{article}

\RequirePackage[latin1]{inputenc}

% --- font selection ----
% font selection  -- optimized for use with nuweb
% If you don't have these fonts, just comment this whole section out
\RequirePackage[T1]{fontenc}
\RequirePackage{lmodern} % *slightly* nicer Computer Modern 
\RequirePackage[scaled=0.87]{beramono} % nicer \ttfamily, *can* scale
\RequirePackage[scaled=.95]{helvet} % nicer \sffamily, *can* scale
\RequirePackage{pifont} % loads dingbat fonts, see "psnfss2e.pdf"
\renewcommand{\baselinestretch}{1.03}

% --- page layout selection ----
\RequirePackage[
          paperwidth =  8.50in,   %  top + bottom + textheight = paperheight
         paperheight = 11.00in,   %  top + bottom + textheight = paperheight
                 top =  1.1in,   %  top + bottom + textheight = paperheight
              bottom =  1.1in,   %
             headsep =  0.15in,   % separation between text and header
          headheight =  0.25in,   % header height (meaning unclear)
            footskip =  0.35in,   % bottom-of-footer to bottom-of-text
                left =  1.25in,
               right =  1.25in
	]{geometry}

% --- standard LaTeX packages ----
\RequirePackage{ragged2e}
\RequirePackage[english]{babel}
\RequirePackage{hyperref}
\RequirePackage{graphicx}
\RequirePackage{xspace} 
\RequirePackage{amsmath}
\RequirePackage{amsthm}
\RequirePackage{amssymb}
\RequirePackage{ifpdf}
\RequirePackage{graphicx}
\RequirePackage{color}
\RequirePackage{fancyvrb}
\RequirePackage{microtype} 
\RequirePackage{calc} 

% --- graphics path ----
\ifpdf
\graphicspath{{./figures/figures_PDF/}}
\else
\graphicspath{{./figures/figures_EPS/}}
\fi

% --- acronym macros ----
\newcommand{\QSEacronymmagnification}{0.953333}
\newcommand{\QSEacronymupper}[1]{%
	\protect\scalebox{\QSEacronymmagnification}{\mbox{#1}}}
\newcommand{\QSEacronymlower}[1]{#1}

% --- acronyms ----
\newcommand{\BLAS}    {\QSEacronymupper{BLAS}\xspace}
\newcommand{\BLIS}    {\QSEacronymupper{BLIS}\xspace}
\newcommand{\MATLAB}  {\QSEacronymupper{MATLAB}\xspace}
\newcommand{\QSE}     {\QSEacronymupper{QSE}\xspace}
\newcommand{\QSEPACK} {\QSEacronymupper{QSEPACK}\xspace}
\newcommand{\UW}      {\QSEacronymupper{UW}\xspace}

% --- unusual names ----
\newcommand{\Kahler}{K\"{a}hler}
\newcommand{\Ito}{It\^{o}}

% --- unusual typography ----
\newcommand{\QSEtt}[1]{\texttt{#1}}

% --- LaTeX math markup ----
\newcommand{\myEnsuremath}[1]{\ensuremath{#1}}  
\newcommand{\myBoldsymbol}[1]{\boldsymbol{#1}}
\newcommand{\myHat}[1]{\Hat{#1}}
\newcommand{\myBar}[1]{\Bar{#1}}

% For reference on the idioms used, see ...
% Command syntax:         Gratzner Section  9.1, pp 267-276.
% Math fonts:             Gratzner Section A.13, pp 355.
% Overstrikes and tildes: Gratzner Section A.12, pp 355.
% Delimiters:             Gratzner Section  4.6, pp 152.

\newcommand*{\myMathcal}[1]{\mathcal{#1}}
\newcommand*{\myMathfrak}[1]{\mathfrak{#1}}
\newcommand*{\myMathbb}[1]{\mathbb{#1}}
\newcommand*{\myMathbf}[1]{\mathbf{#1}}
\newcommand*{\myPrime}[1]{{#1'}} 
\newcommand*{\myPprime}[1]{{#1''}} 
\newcommand*{\myDot}[1]{{\dot{#1}}}
\newcommand*{\myDdot}[1]{{\ddot{#1}}}

% Adorning variables: mnemonic rules:
% "s" commands apply to symbols only
% "l" commands apply to latin characters
% "gs" commands apply to greek characters

% Symbols with accents
\newcommand*{\stilde}[1]{\myEnsuremath{\tilde{#1}}}
\newcommand*{\shat}[1]{\myEnsuremath{\myHat{#1}}}
\newcommand*{\svec}[1]{\myEnsuremath{\vec{#1}}}
\newcommand*{\sbar}[1]{\myEnsuremath{\myBar{#1}}}
\newcommand*{\sprime}[1]{\myEnsuremath{\myPrime{#1}}}
\newcommand*{\spprime}[1]{\myEnsuremath{\myPprime{#1}}}
\newcommand*{\sdot}[1]{\myEnsuremath{\myDot{#1}}}
\newcommand*{\sddot}[1]{\myEnsuremath{\myDdot{#1}}}

% Greek bold characters with accents (Latin characters disparaged)
\newcommand*{\gsb}[1]{\myEnsuremath{\myBoldsymbol{#1}}}
\newcommand*{\gsbtilde}[1]{\myEnsuremath{\tilde{\gsb{#1}}}}
\newcommand*{\gsbhat}[1]{\myHat{\gsb{#1}}}
\newcommand*{\gsbbar}[1]{\myBar{\gsb{#1}}}
\newcommand*{\gsbprime}[1]{\myPrime{\gsb{#1}}}
\newcommand*{\gsbpprime}[1]{\myPprime{\gsb{#1}}}
\newcommand*{\gsbdot}[1]{\myDot{\gsb{#1}}}
\newcommand*{\gsbddot}[1]{\myDdot{\gsb{#1}}}

% Latin bold characters with accents (Latin characters disparaged)
\newcommand*{\lb}[1]{\gsb{#1}}
\newcommand*{\lbtilde}[1]{\myEnsuremath{\tilde{\lb{#1}}}}
\newcommand*{\lbhat}[1]{\myHat{\lb{#1}}}
\newcommand*{\lbbar}[1]{\myBar{\lb{#1}}}
\newcommand*{\lbprime}[1]{\myPrime{\lb{#1}}}
\newcommand*{\lbpprime}[1]{\myPprime{\lb{#1}}}
\newcommand*{\lbdot}[1]{\myDot{\lb{#1}}}
\newcommand*{\lbddot}[1]{\myDdot{\lb{#1}}}

% Latin variant fonts (disparaged)
\newcommand*{\lcal}[1]{\myEnsuremath{\myMathcal{#1}}}
\newcommand*{\lbcal}[1]{\myEnsuremath{\gsb{\myMathcal{#1}}}}
\newcommand*{\lbb}[1]{\myEnsuremath{\myMathbb{#1}}}
\newcommand*{\lfrak}[1]{\myEnsuremath{\myMathfrak{#1}}}
\newcommand*{\lbfrak}[1]{\myEnsuremath{\gsb{\myMathfrak{#1}}}}

% Latin character typefaces
\newcommand*{\lsf}{\mathsf}%math sans serif
\newcommand*{\ltt}{\mathtt}%math typewriter

% text mode font shortcuts
\newcommand*{\tbf}{\textbf}%text bold
\newcommand*{\tit}{\textit}%text italic
\newcommand*{\tsl}{\textsl}%text slanted
\newcommand*{\tsc}{\textsc}%text small cap
\newcommand*{\ttt}{\texttt}%text typewriter
\newcommand*{\trm}{\textrm}%text roman
\newcommand*{\tsf}{\textsf}%text sans serif
\newcommand*{\tup}{\textup}%text upright

% Macros for Dirac bra-ket notation
\newcommand*{\braket}[3]{\myEnsuremath{\langle#1|#2|#3\rangle}}
\newcommand*{\inner}[2]{\myEnsuremath{\langle#1|#2\rangle}}
\newcommand*{\expect}[1]{\myEnsuremath{\langle#1\rangle}}
\newcommand*{\bra}[1]{\myEnsuremath{\langle#1|}}
\newcommand*{\ket}[1]{\myEnsuremath{|#1\rangle}}

% % Latin bold italic sans serif fonts (for use in tensors)
% % This low-level font command assumes that Adobe Helvetica is available
% % The inspiration for this non-obvious command comes from:
% %   (1) the OzTeX TeX file "test1.tex", 
% %   (2) the OzTeX font descriptor file "ot1phv.fd", and
% %   (3) Section 9.5 of Gratzer's book
% \DeclareMathAlphabet{\mathbisf}{OT1}{phv}{b}{sl}
% % An alternative all-LaTeX "hack" command is
% %     \DeclareMathAlphabet{\mathbisffont}{OT1}{cmss}{m}{sl}
% %     \newcommand*{\mathbisf}[1]{\myEnsuremath{\pmb{\mathbisffont{#1}}}}
% % and an alternative all-kosher-LaTeX command is
% %     \newcommand*{\mathbisf}[1]{\myEnsuremath{%
% %       \text{\sffamily \bfseries \itshape #1}}}
% \newcommand*{\ttunderscore}{{\hspace*{0.05ex}\_\hspace*{0.3ex}}}


\newcommand{\myversion}{2.01}
\newcommand{\myversiondate}{\today}

\title{\scshape The \QSEPACK Template Library \\[2ex] 
{\Large  Tools for Quantum System Engineering (\QSE)}}
\author{\normalsize John A. Sidles}
\date{\normalsize Release \myversion\\[0.5ex] \myversiondate}

\begin{document}

\maketitle

\begin{center}
\Large
\textbf{(early working draft of \QSEPACK 2)}
\end{center}

\tableofcontents

\newpage

\begin{table}[p]
\centering

\makebox[\textwidth][c]{%
	\includegraphics[width=(\paperwidth-0.5in)]{QSE_summary.pdf}%
}

\caption{%
	\label{table: BLIS/BLAS}%
	Efficient quantum simulation on manifolds: framework and \BLIS/\BLAS recipes.}
\end{table}


% **********************************************************
\part{{\Ito}-Lindblad dynamics}


The main \MATLAB routines provided by \QSEPACK  are:
The main \MATLAB routines provided by \QSEPACK  are:
\begin{itemize}
\item[{\makebox[0pt][l]{%
	\QSEtt{function G=initialize\_metric\_QSE(xiIn)}}}]\ \\[0.5ex]
Given a cell array \QSEtt{xiIn} containing values for the algebraic state coordinates $\xi$ (see Table~2C), \QSEtt{G = initialize\_metric\_QSE(xiIn)} initializes and returns a structure \QSEtt{G} specifying the metric matrix $g_{\sbar\alpha,\beta}$ (see Table~2D) in a compressed representation (see Table~2E) that is suitable as an argument for \QSEtt{compute\_product\_QSE(...)}.
\item[{\makebox[0pt][l]{%
	\QSEtt{function xiOut=compute\_product\_QSE(G,xiIn)}}}]\ \\[0.5ex]
Given a metric structure \QSEtt{G} constructed by \QSEtt{initialize\_metric\_QSE(...)} and a column vector \QSEtt{vIn} containing algebraic state coordinates (see Table~2C), \QSEtt{vOut = compute\_product\_QSE(G,vIn)}, return their matrix-vector product (see Table~1F) in the column vector \QSEtt{vOut}.
\end{itemize}
All other routines in the package are solely for purposes of validation.

\section{Specify \Ito-Lindblad increments}

We break the 

@o ./QSEPACK_2_source/temp.m 
@{function vOut=compute_product_QSE(G,vIn)
@< header for \QSEtt{compute\_product\_QSE.m} @>
@< copyright and license @>
@< code for \QSEtt{compute\_product\_QSE.m} @>@}

\section{Measurement and noise Berezin symbol one-forms}

\section{Hamiltonian dynamics}

\section{Feedback control}


% **********************************************************
\part{\BLIS reduction}

\section{The overall state-space mapping}

\section{Real coordinates on the state-space}

\section{Complex coordinates and holomorphic potentials}

\section{Pull back the \Kahler structure}

\section{Covariant \Ito-Lindblad increments}


% **********************************************************
\part{\BLAS computation}

\section{Introduce tensor network coordinates}

\section{The block structure of the metric}

\section{Computing matrix-vector products}


% **********************************************************
\part{\BLIS-\BLAS integration}

\section{Dynamic polarization}

% ----------------------------------------------------------
\subsection{\BLIS reduction}

\subsection{\BLAS integration}

\subsection{Results and conclusions}

% ----------------------------------------------------------
\section{Large-gradient spin diffusion}

\subsection{\BLIS reduction}

\subsection{\BLAS integration}

\subsection{Results and conclusions}

% ----------------------------------------------------------
\section{Dynamic spin polarization by counterflow diffusion}

\subsection{\BLIS reduction}

\subsection{\BLAS integration}

\subsection{Results and conclusions}

% **********************************************************
\appendix

\part*{Basic data structures}

@d \QSEtt{G} description 
@{%   G  = metric tensor (stored in BLIS form) @}

@d \QSEtt{G.ncoef} description 
@{%   G.ncoef   = [1] size of the %G$-blocks (see Table 2D)@}

\end{document}


